<?php
    include "../includes/DB.class.php";
  
    //$def = $_GET['cod'];
       
    //if($def == "refrescaReservaPendiente"){
        function reservasConfirmadas(){
            try { 
                $db = DB::Instance();
                $data = $db->query('SELECT `Codigo`, `Nombre`, `Correo`, `Fecha`, `Hora` FROM `reservas` WHERE `Estado` = "Confirmada"');

                $this->reservasConfirmada = $data->fetchAll();

            } catch(PDOException $e) {
                $this->error = $e->getMessage();
            }
        }
    //}

    /*if($def == "updateReservaPendiente"){
        function updateReservPendiente($value, $codigo){
            try { 
                $db = DB::Instance();
                $data = $db->query('UPDATE `reservas` SET `Estado`= ' + $value + ' WHERE `Codigo` = ' + $code);          
            } catch(PDOException $e) {
                $this->error = $e->getMessage();
            }
        }
    //}*/
        
?>